[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
GETTOKEN VAR
Function
Get a token from a previous call to TOKENIZE and assign it to VAR.
Syntax
GETTOKEN var
var - Variable to store the retrieved token in.
Remarks
One of the strongest features of PCBoard is it's ability to take a
series of stacked parameters from a command line and use them all at
once instead of requiring the user to navigate a series of menus and
select one option at each step of the way. TOKENIZE is the PPL
equivalent of what PCBoard uses to break a command line into
individual commands (tokens). The number of tokens available may be
accessed via TOKCOUNT(), and each token may be accessed, one at a time,
by GETTOKEN and/or GETTOKEN(). Accessing a token REMOVES it from the
token list. That is, GETTOKEN and GETTOKEN() remove the accessed token
so that the next GETTOKEN or GETTOKEN() gets the next token in the list.
Examples
STRING cmdline
INPUT "Command",cmdline
TOKENIZE cmdline
PRINTLN "You entered ",TOKCOUNT()," tokens"
WHILE (TOKCOUNT() > 0) DO
GETTOKEN cmdline
PRINTLN "Token: ",CHR(34),cmdline,CHR(34)
ENDWHILE
See Also:
GETTOKEN()
TOKCOUNT()
TOKENIZE
TOKENSTR()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson